<!DOCTYPE html><html><head><title>Backbone Route Test</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><script src="../../lib/jquery.min.js"></script><script src="../../lib/underscore.js"></script><script src="../../lib/backbone.js"></script></head><body><script type="text/javascript">var tt = function(id){
    return function(){
        alert("outer fun " + id)
    }
}
var AppRoute = Backbone.Router.extend({
    routes:{
        "alert/:id": "alerts",
        "alert2/:id": tt(2),
        "alert3/:id": tt(3)
    },
    alerts: function (id) {
        alert("inner fun " + id)
    }
});
var appRoute = new AppRoute;

Backbone.history.start();
</script><a type="button" href="#alert/sad">change hash</a><br><a type="button" href="#alert2/sad">change hash</a></body></html>